package com.hc.langchain4j.config;

import dev.langchain4j.memory.ChatMemory;
import dev.langchain4j.memory.chat.MessageWindowChatMemory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author : Henry
 * {@code CreateTime}: 2025-05-30 00:23
 * {@code Version}: 1.0
 */
@Configuration
public class MemoryChatAssistantConf {

    @Bean
    public ChatMemory chatMemory() {
        return MessageWindowChatMemory.withMaxMessages(10);
    }

}
